package com.cn.wanxi.message.domain;

import lombok.Data;

import javax.swing.plaf.IconUIResource;

/**
 * @ClassName Result
 * @Description TODO
 * @Author JiJiang
 * @Date 2022/10/7 21:14
 * @Version 1.0
 */

@Data
public class Result {

    private int code;

    private int count;

    private String msg;

    private Object data;


    private Result() {

    }


    public static Result getResult(int code, int count, String msg, Object data) {
        Result result = new Result();
        result.setCode(code);
        result.setCount(count);
        result.setMsg(msg);
        result.setData(data);
        return result;
    }


    public static Result getResult(String msg) {
        return getResult(0, 0, msg, null);
    }


    public static Result getResult(Object data) {
        return getResult(0, 0, "", data);
    }


    public static Result getResult(String msg, Object data) {
        return getResult(0, 0, msg, data);
    }


}
